In JavaScript from two array of objects I need to filter out objects based on a filter condition in